/**
 * @filename:Const 2017年8月01日
 * @project 微面    边鹏  V1.0
 * Copyright(c) 2017 BianP Co. Ltd. 
 * All right reserved. 
 */
package com.${page_id}.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.${dao_id}.dao.${model_name}Mapper;
import com.${dao_id}.entity.${model_name};
import com.${page_id}.service.${model_name}Service;

/**
 * 	@描述  逻辑层，实现类(${model_name_cn})
 *  @author BianP
 */
@Service
public class ${model_name}ServiceImpl implements ${model_name}Service {
	Logger logger = Logger.getLogger(${model_name}ServiceImpl.class);
	
	@Autowired
	public ${model_name}Mapper ${object}Dao;
	
	//查询对象
	@Override
	public ${model_name} selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return ${object}Dao.selectByPrimaryKey(id);
	}

	//添加
	@Override
	public int insertSelective(${model_name} ${object}) {
		// TODO Auto-generated method stub
		return ${object}Dao.insertSelective(${object});
	}

	//选择性 -- 更新
	@Override
	public int updateByPrimaryKeySelective(${model_name} ${object}) {
		// TODO Auto-generated method stub
		return ${object}Dao.updateByPrimaryKeySelective(${object});
	}

	//全修改 -- 更新
	@Override
	public int updateByPrimaryKey(${model_name} ${object}) {
		// TODO Auto-generated method stub
		return ${object}Dao.updateByPrimaryKey(${object});
	}

	//根据ID 删除对象
	@Override
	public int deleteByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return ${object}Dao.deleteByPrimaryKey(id);
	}
}
